object fProcuraImovel: TfProcuraImovel
  Left = 90
  Top = 85
  Width = 780
  Height = 530
  BorderIcons = [biSystemMenu]
  Caption = 'fProcuraImovel'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PopupMenu = PopupMenu1
  Position = poDesktopCenter
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 764
    Height = 62
    Align = alTop
    BevelInner = bvLowered
    Color = 11189162
    PopupMenu = PopupMenu1
    TabOrder = 0
    object Label1: TLabel
      Left = 84
      Top = 8
      Width = 151
      Height = 16
      Caption = 'Digite o Nome a Procurar'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label2: TLabel
      Left = 4
      Top = 8
      Width = 66
      Height = 16
      Caption = 'Contrato N.'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object EvDBFind1: TEvDBFind
      Left = 83
      Top = 25
      Width = 364
      Height = 24
      CharCase = ecUpperCase
      DataField = 'NOME_INQUILINO'
      DataSource = DataSource1
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      PopupMenu = PopupMenu1
      TabOrder = 0
    end
    object RadioGroup1: TRadioGroup
      Left = 450
      Top = 3
      Width = 228
      Height = 55
      Caption = 'Procura Por'
      Columns = 3
      ItemIndex = 0
      Items.Strings = (
        'Inquilino'
        'Propriet'#225'rio'
        'Endere'#231'o')
      PopupMenu = PopupMenu1
      TabOrder = 1
      OnClick = RadioGroup1Click
    end
    object RadioGroup2: TRadioGroup
      Left = 678
      Top = 3
      Width = 90
      Height = 55
      Caption = 'Alugado'
      Columns = 2
      ItemIndex = 0
      Items.Strings = (
        'Sim'
        'N'#227'o')
      PopupMenu = PopupMenu1
      TabOrder = 2
      OnClick = RadioGroup2Click
    end
    object EvDBFind2: TEvDBFind
      Left = 3
      Top = 25
      Width = 79
      Height = 24
      DataField = 'COD_IMOBILIARIA'
      DataSource = DataSource1
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      PopupMenu = PopupMenu1
      TabOrder = 3
    end
  end
  object DBGrid1: TDBGrid
    Left = 0
    Top = 62
    Width = 764
    Height = 375
    Align = alClient
    Ctl3D = False
    DataSource = DataSource1
    Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    ParentCtl3D = False
    PopupMenu = PopupMenu1
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    OnDrawColumnCell = DBGrid1DrawColumnCell
    OnTitleClick = DBGrid1TitleClick
    Columns = <
      item
        Expanded = False
        FieldName = 'COD_IMOBILIARIA'
        Title.Caption = 'Contrato'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'NOME_INQUILINO'
        Title.Caption = 'Inquilino'
        Width = 210
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'NOME_PROPRIETARIO'
        Title.Caption = 'Propriet'#225'rio'
        Width = 210
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'RUA'
        Title.Caption = 'Endere'#231'o / Rua'
        Width = 200
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'NR'
        Title.Caption = 'N'#176
        Width = 40
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'BAIRRO'
        Title.Caption = 'Bairro'
        Width = 90
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'CIDADE'
        Title.Caption = 'Cidade'
        Width = 100
        Visible = True
      end>
  end
  object Panel2: TPanel
    Left = 0
    Top = 437
    Width = 764
    Height = 55
    Align = alBottom
    BevelInner = bvLowered
    Color = 11189162
    PopupMenu = PopupMenu1
    TabOrder = 2
    object OK: TBitBtn
      Left = 277
      Top = 7
      Width = 97
      Height = 41
      Caption = 'F4-OK'
      PopupMenu = PopupMenu1
      TabOrder = 0
      OnClick = OKClick
    end
    object btCancelar: TBitBtn
      Left = 397
      Top = 7
      Width = 97
      Height = 41
      Caption = 'F3-Cancelar'
      PopupMenu = PopupMenu1
      TabOrder = 1
      OnClick = btCancelarClick
    end
  end
  object DataSource1: TDataSource
    DataSet = ClientDataSet1
    Left = 216
    Top = 168
  end
  object SQLDataSet1: TSQLDataSet
    CommandText = 
      'select imo.COD_IMOBILIARIA'#13#10'        , imo.COD_IMALU '#13#10'        , ' +
      'imo.COD_INQUILINO'#13#10'        , imo.COD_PROPRIETARIO'#13#10'        , imo' +
      '.NR'#13#10'        , imo.BAIRRO'#13#10'        , imo.CIDADE '#13#10'        , imo.' +
      'ALUGADO'#13#10'        , ed.RUA '#13#10'        , cli.NOME_INQUILINO'#13#10'      ' +
      '  , pro.NOME_PROPRIETARIO '#13#10' from IMOVEL_ALUGUEL imo '#13#10' left out' +
      'er join CEP ed on ed.COD_CEP = imo.COD_ENDERECO '#13#10' left outer jo' +
      'in INQUILINOS cli on cli.COD_INQUILINO =   imo.COD_INQUILINO  '#13#10 +
      ' left outer join PROPRIETARIOS pro on pro.COD_PROPRIETARIO =   i' +
      'mo.COD_PROPRIETARIO  '#13#10' where imo.ALUGADO = :AL'#13#10' order by cli.N' +
      'OME_INQUILINO'#13#10
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'AL'
        ParamType = ptInput
      end>
    SQLConnection = DM.scSge
    Left = 104
    Top = 168
    object SQLDataSet1COD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
      Required = True
    end
    object SQLDataSet1COD_INQUILINO: TIntegerField
      FieldName = 'COD_INQUILINO'
    end
    object SQLDataSet1NR: TStringField
      FieldName = 'NR'
      Size = 5
    end
    object SQLDataSet1BAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 80
    end
    object SQLDataSet1CIDADE: TStringField
      FieldName = 'CIDADE'
      Size = 80
    end
    object SQLDataSet1RUA: TStringField
      FieldName = 'RUA'
      Size = 50
    end
    object SQLDataSet1NOME_INQUILINO: TStringField
      FieldName = 'NOME_INQUILINO'
      Size = 60
    end
    object SQLDataSet1NOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
    object SQLDataSet1ALUGADO: TStringField
      FieldName = 'ALUGADO'
      Size = 1
    end
    object SQLDataSet1COD_IMOBILIARIA: TStringField
      FieldName = 'COD_IMOBILIARIA'
      Size = 10
    end
    object SQLDataSet1COD_PROPRIETARIO: TIntegerField
      FieldName = 'COD_PROPRIETARIO'
    end
  end
  object DataSetProvider1: TDataSetProvider
    DataSet = SQLDataSet1
    Left = 144
    Top = 168
  end
  object ClientDataSet1: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftString
        Name = 'AL'
        ParamType = ptInput
      end>
    ProviderName = 'DataSetProvider1'
    Left = 176
    Top = 168
    object ClientDataSet1COD_IMALU: TIntegerField
      FieldName = 'COD_IMALU'
      Required = True
    end
    object ClientDataSet1COD_INQUILINO: TIntegerField
      FieldName = 'COD_INQUILINO'
    end
    object ClientDataSet1NR: TStringField
      FieldName = 'NR'
      Size = 5
    end
    object ClientDataSet1BAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 80
    end
    object ClientDataSet1CIDADE: TStringField
      FieldName = 'CIDADE'
      Size = 80
    end
    object ClientDataSet1RUA: TStringField
      FieldName = 'RUA'
      Size = 50
    end
    object ClientDataSet1NOME_INQUILINO: TStringField
      FieldName = 'NOME_INQUILINO'
      Size = 60
    end
    object ClientDataSet1NOME_PROPRIETARIO: TStringField
      FieldName = 'NOME_PROPRIETARIO'
      Size = 60
    end
    object ClientDataSet1ALUGADO: TStringField
      FieldName = 'ALUGADO'
      Size = 1
    end
    object ClientDataSet1COD_IMOBILIARIA: TStringField
      FieldName = 'COD_IMOBILIARIA'
      Size = 10
    end
    object ClientDataSet1COD_PROPRIETARIO: TIntegerField
      FieldName = 'COD_PROPRIETARIO'
      ProviderFlags = []
    end
  end
  object PopupMenu1: TPopupMenu
    Left = 288
    Top = 168
    object OK1: TMenuItem
      Caption = 'OK'
      ShortCut = 115
      OnClick = OKClick
    end
    object Cancelar1: TMenuItem
      Caption = 'Cancelar'
      ShortCut = 114
      OnClick = btCancelarClick
    end
  end
end
